$(function() {
	$.each($(".sortable"), function(index, value) {
		$(this).sortable({
			//axis:'y',
			handle: $('.sortable-handler'),
			update : function()
			{
				serial = $(this).sortable("serialize");
				$.ajax({
					type: "POST",
					data: serial,
					dataType: "json",
					success: function(data) {
						$("#ajax-message").html(data.answer).css({"display":"inline"});
						setTimeout(function() { $("#ajax-message").fadeOut(); }, 1000);
					},
					error: function() {
						$('#ajax-message').html('Error');
					}
				});
			}
		});
	});
});
